<md-dialog aria-label="{{ vm.msgKeys.title | translate }}"
           style="max-width: 800px;">
    <form name="vm.editForm" ng-submit="vm.submit()" novalidate style="overflow: initial;" layout-padding>
        <md-dialog-content layout="column" layout-padding>

            <div>
                <h2 ng-if="vm.msgKeys.heading !== undefined">{{ vm.msgKeys.heading | translate }}</h2>
                <h2 ng-if="vm.msgKeys.heading === undefined">{{ 'ADMINCONSOLE.DIALOG.EDIT_DOMAINS.TITLE' | translate }}</h2>
            </div>

            <div layout="row" layout-fill>
                <md-input-container md-theme="eBlockerThemeInput" style="width: 100%">
                    <label>{{ vm.msgKeys.label | translate }}</label>
                    <textarea name="domains" eb-url-domains ng-model="vm.value" md-maxlength="vm.maxLength" required></textarea>
                    <div ng-messages="vm.filterListForm.domains.$error" ng-if="vm.filterListForm.$submitted || vm.filterListForm.domains.$touched">
                        <div ng-message="required">{{ 'ADMINCONSOLE.DIALOG.EDIT_DOMAIN.ERROR.DOMAINS_REQUIRED' | translate }}</div>
                        <div ng-message="urlDomains">{{ 'ADMINCONSOLE.DIALOG.EDIT_DOMAIN.ERROR.DOMAINS_INVALID' | translate }}</div>
                        <div ng-message="md-maxlength">{{ 'ADMINCONSOLE.DIALOG.EDIT_DOMAIN.ERROR.DOMAINS_TOO_LONG' | translate }}</div>
                    </div>
                </md-input-container>
            </div>
        </md-dialog-content>

        <md-dialog-actions layout="row"
                           layout-align="end center"
                           layout-xs="column"
                           layout-align-xs="center center"
                           style="padding-right: 16px;">
            <md-button type="button" ng-click="vm.cancel()" class="md-raised md-secondary">{{ 'ADMINCONSOLE.DIALOG.EDIT_DOMAIN.ACTION.CANCEL' | translate }}</md-button>
            <md-button type="submit" class="md-raised md-primary md-accent">{{ 'ADMINCONSOLE.DIALOG.EDIT_DOMAIN.ACTION.OK' | translate }}</md-button>
        </md-dialog-actions>
    </form>
</md-dialog>
